package book;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 666
 * Date: 2022-11-18
 * Time: 20:32
 */
public class booklist {
   private book[] books=new book[10];
   private int bookSize;
    public int getBookSize() {
        return bookSize;
    }

    public void setBookSize(int bookSize) {
        this.bookSize = bookSize;
    }

    {
        books[0] = new book("三国演义", "朱承星", "小说", 9);
        books[1] = new book("水浒传", "伞兵", "小说", 5);
        books[2] = new book("西游记", "小赵", "小说", 8);
bookSize=3;
    }

    public void setBooks(int a,book book1) {
        this.books[a] = book1;
    }

    public void setBooks(book book1){
        this.books[bookSize]=book1;
   }
    public book getBooks(int a) {
        return this.books[a];
    }
}

